package br.scrumplete.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

public class Sprint {
    
    @OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE} )
    @JoinColumn(name="id")
    private Integer id;

    @Column(name = "name", nullable = false, length = 120)
    private String name;

    @Column(name = "info", nullable = true)
    private String info;

    @OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE} )
    @JoinColumn(name="id")
    private List<BacklogItem> backlogItemList;

    @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE} )
    @JoinColumn(name="id")
    private Project project;

    /**
     * @return the name
     */
    public String getName() {
	return name;
    }

    /**
     * @param name
     *            the name to set
     */
    public void setName(String name) {
	this.name = name;
    }

    /**
     * @return the info
     */
    public String getInfo() {
	return info;
    }

    /**
     * @param info
     *            the info to set
     */
    public void setInfo(String info) {
	this.info = info;
    }

    /**
     * @return the backlogItemList
     */
    public List<BacklogItem> getBacklogItemList() {
	return backlogItemList;
    }

    /**
     * @param backlogItemList
     *            the backlogItemList to set
     */
    public void setBacklogItemList(List<BacklogItem> backlogItemList) {
	this.backlogItemList = backlogItemList;
    }

    /**
     * @return the project
     */
    public Project getProject() {
        return project;
    }

    /**
     * @param project the project to set
     */
    public void setProject(Project project) {
        this.project = project;
    }

    /**
     * @return the id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Integer id) {
        this.id = id;
    }

}
